package com.ruoyi.system.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.domain.entity.SysUserOtherInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysUserOtherInfoMapper;
import com.ruoyi.system.service.ISysUserOtherInfoService;
import org.springframework.transaction.annotation.Transactional;

/**
 * 用户扩展信息Service业务层处理
 * 
 * @author zhz
 * @date 2024-03-11
 */
@Service
@Transactional
public class SysUserOtherInfoServiceImpl extends ServiceImpl<SysUserOtherInfoMapper, SysUserOtherInfo> implements ISysUserOtherInfoService
{
    @Autowired
    private SysUserOtherInfoMapper sysUserOtherInfoMapper;

    /**
     * 查询用户扩展信息
     * 
     * @param userId 用户扩展信息主键
     * @return 用户扩展信息
     */
    @Override
    public SysUserOtherInfo selectSysUserOtherInfoByUserId(Long userId)
    {
        return sysUserOtherInfoMapper.selectSysUserOtherInfoByUserId(userId);
    }

    /**
     * 查询用户扩展信息列表
     * 
     * @param sysUserOtherInfo 用户扩展信息
     * @return 用户扩展信息
     */
    @Override
    public List<SysUserOtherInfo> selectSysUserOtherInfoList(SysUserOtherInfo sysUserOtherInfo)
    {
        return sysUserOtherInfoMapper.selectSysUserOtherInfoList(sysUserOtherInfo);
    }

    /**
     * 新增用户扩展信息
     * 
     * @param sysUserOtherInfo 用户扩展信息
     * @return 结果
     */
    @Override
    public int insertSysUserOtherInfo(SysUserOtherInfo sysUserOtherInfo)
    {
        return sysUserOtherInfoMapper.insertSysUserOtherInfo(sysUserOtherInfo);
    }

    /**
     * 修改用户扩展信息
     * 
     * @param sysUserOtherInfo 用户扩展信息
     * @return 结果
     */
    @Override
    public int updateSysUserOtherInfo(SysUserOtherInfo sysUserOtherInfo)
    {
        return sysUserOtherInfoMapper.updateSysUserOtherInfo(sysUserOtherInfo);
    }

    /**
     * 批量删除用户扩展信息
     * 
     * @param userIds 需要删除的用户扩展信息主键
     * @return 结果
     */
    @Override
    public int deleteSysUserOtherInfoByUserIds(Long[] userIds)
    {
        return sysUserOtherInfoMapper.deleteSysUserOtherInfoByUserIds(userIds);
    }

    /**
     * 删除用户扩展信息信息
     * 
     * @param userId 用户扩展信息主键
     * @return 结果
     */
    @Override
    public int deleteSysUserOtherInfoByUserId(Long userId)
    {
        return sysUserOtherInfoMapper.deleteSysUserOtherInfoByUserId(userId);
    }
}
